<script lang="ts">
export default {
  data() {
    return {}
  },
  methods: {
    tovideo() {
      this.$router.push({
        path: '/video'
      })
    }
  }
}
</script>

<template>
  <!-- 大图 -->
  <div class="big-img" @click="tovideo"><img src="../components/images/b1.jpg" alt="" /></div>

  <!-- 热播 -->
  <div class="container">
    <div class="alltitle">全网热播 · 新片速递 <a href="#" @click="tovideo">更多</a></div>

    <div class="hot">
      <div class="hl">
        <div class="img" @click="tovideo"><img src="../components/images/1.jpg" alt="" /></div>
        <div class="hl-body">
          <div class="hl-title">流浪地球</div>
          <div class="hl-text">太阳即将毁灭</div>
        </div>
      </div>
      <div class="hr">
        <ul>
          <li>
            <a href="#" @click="tovideo">
              <div class="h-body">
                <div class="img"><img src="../components/images/2.jpg" alt="" /></div>
                <div class="h-title">三体</div>
                <div class="h-text">根据刘慈欣同名科幻小说改编</div>
              </div></a
            >
          </li>
          <li>
            <a href="#" @click="tovideo">
              <div class="h-body">
                <div class="img"><img src="../components/images/3.jpg" alt="" /></div>
                <div class="h-title">三体</div>
                <div class="h-text">根据刘慈欣同名科幻小说改编</div>
              </div></a
            >
          </li>
          <li>
            <a href="#" @click="tovideo">
              <div class="h-body">
                <div class="img"><img src="../components/images/4.jpg" alt="" /></div>
                <div class="h-title">三体</div>
                <div class="h-text">根据刘慈欣同名科幻小说改编</div>
              </div></a
            >
          </li>
          <li>
            <a href="#" @click="tovideo">
              <div class="h-body">
                <div class="img"><img src="../components/images/5.jpg" alt="" /></div>
                <div class="h-title">三体</div>
                <div class="h-text">根据刘慈欣同名科幻小说改编</div>
              </div>
            </a>
          </li>
          <li>
            <a href="#" @click="tovideo">
              <div class="h-body">
                <div class="img"><img src="../components/images/6.jpg" alt="" /></div>
                <div class="h-title">三体</div>
                <div class="h-text">根据刘慈欣同名科幻小说改编</div>
              </div></a
            >
          </li>
          <li>
            <a href="#" @click="tovideo">
              <div class="h-body">
                <div class="img"><img src="../components/images/7.jpg" alt="" /></div>
                <div class="h-title">三体</div>
                <div class="h-text">根据刘慈欣同名科幻小说改编</div>
              </div></a
            >
          </li>
        </ul>
      </div>
    </div>
  </div>

  <!-- 免费 -->
  <div class="container">
    <div class="alltitle">限时免费影院<a href="#" @click="tovideo">更多</a></div>
    <div class="free">
      <ul>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <span>限免</span>
                <img src="../components/images/8.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <span>限免</span>
                <img src="../components/images/9.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <span>限免</span>
                <img src="../components/images/10.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <span>限免</span>
                <img src="../components/images/11.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <span>限免</span>
                <img src="../components/images/12.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
      </ul>
    </div>
  </div>

  <div class="container foot">
    <div class="alltitle">值得N刷的电影<a href="#" @click="tovideo">更多</a></div>
    <div class="free">
      <ul>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <img src="../components/images/13.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <img src="../components/images/14.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <img src="../components/images/15.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <img src="../components/images/16.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
        <li>
          <a href="#" @click="tovideo">
            <div class="free-box">
              <div class="img">
                <img src="../components/images/17.jpg" alt="" />
              </div>
              <div class="f-b"></div>
            </div>
          </a>
        </li>
      </ul>
    </div>
  </div>
</template>

<style>
/* hot */
.hot {
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hl {
  width: 30%;
}

.hl .img {
  width: 100%;
  height: 290px;

  overflow: hidden;
}
.hl .img img {
  width: 100%;
  transition: 0.6s;
}
.hl .img img:hover {
  transform: scale(1.1);
}
.hl-body {
  padding: 15px 20px;
  height: 100px;
  background-color: #3f3e45;
  color: #fff;
}
.hl-title {
  margin-bottom: 10px;
  font-size: 20px;
}
.hl-text {
  font-size: 16px;
  color: #cecece;
}
.hr {
  margin-left: 2%;
  width: 68%;
}

.hr ul {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-flow: row wrap;
  width: 100%;
}
.hr ul li {
  width: 30%;
  margin: 1%;
}
.hr ul li .img {
  margin-bottom: 5px;
  width: 100%;
  height: 130px;
  overflow: hidden;
}
.hr .img img {
  width: 100%;
  transition: 0.6s;
}

.hr .img img:hover {
  transform: scale(1.1);
}
.h-body {
  color: #aaaaaa;
}

.hr .h-body:hover {
  color: #fff;
}

/* free */
.free {
  width: 100%;
}
.free ul {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.free li {
  width: 18%;
}

.free .img {
  position: relative;
  width: 100%;
}

.free .img img {
  width: 100%;
}

.free .img span {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 14px;
  color: #fff;
  background-color: red;
}
.free-box {
  position: relative;
}
.f-b {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00000025;
}

.free li:hover .f-b {
  display: none;
}

.foot {
  padding-bottom: 50px;
}
</style>
